Repository navigation
Conversation
An adversarial review of f1938ca (6 reviewers, 3 skeptics per finding) upheld 54 of 55 findings. This applies them: - Chaos holds the request, then route.fallback(), instead of fetching the response from Node and holding its delivery. Matched requests now go through the test's own routes (context.route, routeFromHAR) and the browser's network stack (redirects, cookies, CORS, streams); nothing is buffered; no actionTimeout abort. Keys and delays are assigned when the page sends the request, so a seed reproduces whatever the server does; reorder:false sends requests in order, at least 30 ms apart. The default filter is decided from the request: same-origin /api* or Accept: json. Cross-origin keys drop the port. - The agent link gets a stand-in fetch for its own address, so the fixture logs no console error, failed request or CSP report (it did on every page load). AGENT_URL matching no longer catches 127.0.0.1:9xxx apps. - Detections come from the runtime's decide event with the model's diagnosis confidence (the sink record's p was the action's probability), synchronously, so none are lost at the end of a test. - The runtime is held to observe when ?genclass= or localStorage raised it. - The race file gets a fixture record (model option, agent state, chaos requests held, service worker, mode override); the report notes runs the fixture could not check and chaos that held nothing. The blanket state "off" exemption is gone: model-only files are reported as before. - Retries write their own file (-r<n>); skipped tests write none; files go to the project's outputDir (emptied each run, so no stale seeds). - Witness lines state the gap correctly; opOf drops per-run op ids. - test is typed from @playwright/test; typesVersions for node10; engines ^20.19.0 || >=22.12.0; startGenClass takes a Page. - CI: the e2e step runs with pipefail (it could not fail before), wider path filters, the runtime-resolution unit test where the runtime is built. run.mjs enforces no other signature on the buggy page; the spec fails on any console error or failed request. - Docs: typed config, @beta install, request-side chaos, the globals the page gets, service workers and routes, the e2e's script-tag mapping, model download per test context, compat numbers with the runtime version and the 270 injected-failure findings. Measured after the change: six e2e runs (30 seeds per row): buggy page 30 of 30, latency only 0 of 30, fixed page 0 of 30; no console errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fjo9SusiHz3LvqdFnr5wYP
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #72, which merged with only its first commit; these fixes were pushed 40 minutes after the merge and never reached
main. An adversarial review of the fixture (6 reviewers, then 3 skeptics per finding) upheld 54 of 55 findings, none blockers, 16 major. This applies them. All changes are inpackages/playwright, plus one CI step, one AGENTS.md cell and the lockfile'senginesline.The ones that matter most:
context.routeandrouteFromHARmocks, buffered streams, and keyed requests by response arrival, so seeds did not reproduce. It now holds the request and then callsroute.fallback(); keys are assigned when the page sends the request.reorder: falsesends requests in order, at least 30 ms apart.decideevent.?genclass=healorlocalStorage.genclasscould raise the fixture's runtime out of observe; it is now set back.-r<n>), skipped tests write none, and the default output is the project's outputDir, which Playwright empties each run.fixturerecord (model option, agent state, requests chaos held, service worker, mode override), and the report notes runs the fixture could not check. Files without that record are reported exactly as before.testis typed from@playwright/test,typesVersionsformoduleResolution: node,engines^20.19.0 || >=22.12.0(CommonJS projectsrequirethe ESM-only fixture), and the README's config usesdefineConfig<GenClassFixtures>(without it, TypeScript rejectsuse.genclass).mainalready has the pipefail fix for the e2e step.run.mjsnow fails on other signatures on the buggy page, and the spec fails on any console error or failed request.The commit message lists every change.
Checks
npm run build -w @genclass/runtimepasses (no runtime source is touched; the e2e serves itsdist/)npm run typecheck -w @genclass/playwright,npm run build -w @genclass/playwright,cd packages/playwright && npx vitest run: 114 passed. The CI smoke run, which loads the reporter by module name, passespackages/runtime/test/review-*.test.tswas editedpackages/runtime/src/)docs/runtime/API.md, the runtime'ssrc/types.tsandpackages/runtime/CHANGELOG.md: not applicable (runtime untouched); the package's README, CHANGELOG and JSDoc are updateddelayMs(10 s cap) and never changes themsim/anddemos/are untouchedpackage-lock.jsonis in sync (one line: the package'sengines);npm cipassesNotes for the reviewer
Measured:
packages/playwright/test/e2e/run.mjs, headless Chromium 153, Playwright 1.63.0,model: "skip". Six runs of five seeds on 2026-10-25 before rebasing ontomain(30 seeds per row), and one more run after:witness:overwrote-neweronGET /api/searchreorder: false)In a separate browser check, a
context.routemock still answers under chaos, adefault-src 'self'page logs nothing, and?genclass=healis set back to observe.The one finding not upheld: the e2e summary's
staleSeedslabel (judged a naming choice).Rebased onto
mainat 7f96182. Conflicts were in AGENTS.md (the new package rows onmainwere kept) and in the workflow (the pipefail comment frommainwas kept). Not run: the runtime's own suites (unchanged),test/smoke/smoke.sh, the install suite, and anything on Azure.Generated by Claude Code